// -*- Java -*-
/*!
 * @file Proxy.java
 * @date $Date$
 *
 * $Id$
 */

import jp.go.aist.rtm.RTC.Manager;
import jp.go.aist.rtm.RTC.RTObject_impl;
import jp.go.aist.rtm.RTC.RtcDeleteFunc;
import jp.go.aist.rtm.RTC.RtcNewFunc;
import jp.go.aist.rtm.RTC.util.Properties;

/*
 * ! @class Proxy @brief RTC-Lite for Arduino
 */
public class Proxy implements RtcNewFunc, RtcDeleteFunc {

	// Module specification
	// <rtc-template block="module_spec">
	public static String component_conf[] = { "implementation_id", "Proxy",
			"type_name", "Proxy", "description", "RTC-Lite for Arduino",
			"version", "1.0.0", "vendor", "AIST", "category", "Proxy",
			"activity_type", "STATIC", "max_instance", "1", "language", "Java",
			"lang_type", "compile", "exec_cxt.periodic.rate", "0.2",
			// Configuration variables
			"conf.default.MAC_addr", "00-00-00-00-00-00", "" };

	// </rtc-template>

	public RTObject_impl createRtc(Manager mgr) {
		return new ProxyImpl(mgr);
				    
	}

	public void deleteRtc(RTObject_impl rtcBase) {
		rtcBase = null;
	}
	
    public void registerModule() {
        Properties prop = new Properties(component_conf);
        final Manager manager = Manager.instance();
        manager.registerFactory(prop, new Proxy(), new Proxy());
    }
}
